Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0] Query: Don't add grouping key to projection when Distinct is applied #28143

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

smitpatel
Copy link
Contributor

Resolves #28039

Description

If we need to push current query into a subquery when query has group by operation, we add grouping key to projection so we can refer to them outside but that is incorrect if distinct is applied on the projection since it would change meaning of distinct.

Customer impact

Customers running query which are affected by scenario will get incorrect results.

How found

Customer reported on 6.0.5

Regression

Yes as reported by customer, it worked on 5.0.13

Testing

Added tests for affected scenario.

Risk

Low. Also added quirk to revert back to older behavior.

@smitpatel smitpatel requested review from ajcvickers and a team June 1, 2022 20:17
@dougbu
Copy link
Member

dougbu commented Jun 7, 2022

/ping all. The release/6.0 branch is open for 6.0.7 changes but this PR is neither servicing-approved nor approved. Thanks…

@dougbu
Copy link
Member

dougbu commented Jun 7, 2022

Please add a comment when this gets servicing-approved

@smitpatel
Copy link
Contributor Author

cc: @ajcvickers @AndriySvyryd

@rbhanda rbhanda added this to the 6.0.7 milestone Jun 14, 2022
@ajcvickers ajcvickers merged commit 0ac98ef into release/6.0 Jun 14, 2022
@ajcvickers ajcvickers deleted the smit/hereandthere branch June 14, 2022 17:28
@ajcvickers ajcvickers removed this from the 6.0.7 milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants